#include <ukey/ukey.h>
#include <gwbase/base/util.h>
#include <gwbase/base/test_harness.h>
#include <gwbase/base/test_util.h>

using namespace dicom;

class UKeyTest {};

TEST(UKeyTest, GetTokenListList) {
  Status s;
  s = ukey::UKeyHelper::GlobalInit();
  EXPECT_TRUE(s.ok());

  ukey::UKeyHelper kh;
  std::vector<ukey::TokenInfo> slots;
  s = kh.GetTokenList(&slots);
  EXPECT_TRUE(s.ok());

  EXPECT_TRUE(slots.size() == 1);

  ukey::UKeyHelper::GlobalCleanup();
}

int main() {
  dicom::RunAllTests();
  return 0;
}
